import { Component } from '@angular/core';

declare var form: any;

@Component({
  templateUrl: './bpm.simple.html'
})
export class BpmSimpleComponent {
  fs: any = null;

  constructor() {
    this.fs = new form.FormSimpleService('simpleform', {
      orderObject: { id: 0 },
      keyField: 'id',
      randomFields: ['id']
    });
    this.fs.loadData(true);
  }

  editRow(item) {
    if (item) {
      window.open('#bpm_simlpeform_mis?info=true&id=' + item.id);
    } else {
      window.open('#bpm_simlpeform_mis?info=true');
    }
  }
}
